package com.taylor.community;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;

import javax.annotation.PostConstruct;

/**
 * @author 26925
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class CommunityApplication {
	@PostConstruct//管理bean生命周期 管理bean的初始化方法
	//这个bean是最早被加载的
	public void init(){
		//解决netty启动冲突问题
		//可参考 Netty4Utils.setAvailableProcessors()
		System.setProperty("es.set.netty.runtime.available.processors","false");
	}

	public static void main(String[] args) {
		SpringApplication.run(CommunityApplication.class, args);
	}

}
